/*************************************************************************
	> File Name: oj-193_find_x_plus_k_equal_s.c
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年10月26日 星期一 14时47分27秒
 ************************************************************************/

#include <stdio.h>
#include <stdlib.h>

int bs(int *arr, int n, int x) {
    int l = 0, r = n, mid;
    while (l <= r) {
        mid = (l + r) / 2;
        if (arr[mid] == x) return 1;
        if (arr[mid] < x) l = mid + 1;
        if (arr[mid] > x) r = mid - 1;
    }
    return 0;
}

int main() {
    int n, k, s, a;
    scanf("%d", &n);
    int *arr = (int *)malloc(sizeof(int) * n);
    for (int i = 0; i < n; ++i) {
        scanf("%d", &arr[i]);
    }
    scanf("%d%d", &k, &s);
    a = bs(arr, n, s - k);
    printf("%s", a ? "YES" : "NO");
    free(arr);
    return 0;
}
